import request from '@u/request'
import { header } from '@/api/project-update/tempHeader'

const gateway = '/project'
// const gateway = 'http://localhost:8080/city/local'

export function getSubProjectInventoryList(params) {
  return request({
    url: `${gateway}/project/selectSubProjectList`,
    method: 'post',
    data: params,
    headers: { ...header },
  })
}

export function addSubProjectInventory(params) {
  return request({
    url: `${gateway}/project/insertSubProject`,
    method: 'post',
    data: params,
    headers: { ...header },
  })
}

export function updateSubProjectInventory(params) {
  return request({
    url: `${gateway}/project/updateSubProject`,
    method: 'put',
    data: params,
    headers: { ...header },
  })
}

export function deleteSubProjectInventory(id) {
  return request({
    url: `${gateway}/project/deleteSubProject/${id}`,
    method: 'delete',
    headers: { ...header },
  })
}
